package com.ruoyi.reunion.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.reunion.mapper.ActivityCommentMapper;
import com.ruoyi.reunion.domain.ActivityComment;
import com.ruoyi.reunion.service.IActivityCommentService;

/**
 * 活动评论Service业务层处理
 * 
 * @author ccccc
 * @date 2025-04-11
 */
@Service
public class ActivityCommentServiceImpl implements IActivityCommentService 
{
    @Autowired
    private ActivityCommentMapper activityCommentMapper;

    /**
     * 查询活动评论
     * 
     * @param id 活动评论主键
     * @return 活动评论
     */
    @Override
    public ActivityComment selectActivityCommentById(Long id)
    {
        return activityCommentMapper.selectActivityCommentById(id);
    }

    /**
     * 查询活动评论列表
     * 
     * @param activityComment 活动评论
     * @return 活动评论
     */
    @Override
    public List<ActivityComment> selectActivityCommentList(ActivityComment activityComment)
    {
        return activityCommentMapper.selectActivityCommentList(activityComment);
    }

    /**
     * 新增活动评论
     * 
     * @param activityComment 活动评论
     * @return 结果
     */
    @Override
    public int insertActivityComment(ActivityComment activityComment)
    {
        activityComment.setCreateTime(DateUtils.getNowDate());
        return activityCommentMapper.insertActivityComment(activityComment);
    }

    /**
     * 修改活动评论
     * 
     * @param activityComment 活动评论
     * @return 结果
     */
    @Override
    public int updateActivityComment(ActivityComment activityComment)
    {
        activityComment.setUpdateTime(DateUtils.getNowDate());
        return activityCommentMapper.updateActivityComment(activityComment);
    }

    /**
     * 批量删除活动评论
     * 
     * @param ids 需要删除的活动评论主键
     * @return 结果
     */
    @Override
    public int deleteActivityCommentByIds(Long[] ids)
    {
        return activityCommentMapper.deleteActivityCommentByIds(ids);
    }

    /**
     * 删除活动评论信息
     * 
     * @param id 活动评论主键
     * @return 结果
     */
    @Override
    public int deleteActivityCommentById(Long id)
    {
        return activityCommentMapper.deleteActivityCommentById(id);
    }
}
